﻿<View 
    x:Class="Poet.Views.FormatSetView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

	<View.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="..\Resources\XamlStore.xaml"/>
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</View.Resources>

	<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
		<StackPanel>
			<StackPanel Margin="4" DataContext="{Binding ViewModel}">
				<Expander Header="{Localizing TextEditor}" IsExpanded="{ViewModel IsTextEditorExpanded, DefaultValue=True}">
					<ItemsControl DataContext="{Binding TextEditorViewModel}" ItemsSource="{StaticResource CommonToolBarCollection1}">
						<ItemsControl.Resources>
							<Style TargetType="ToggleButton" BasedOn="{StaticResource {x:Type ToggleButton}}">
								<Setter Property="Margin" Value="2"/>
							</Style>
							<Style TargetType="CheckBox">
								<Setter Property="VerticalAlignment" Value="Center"/>
								<Setter Property="Margin" Value="4 2 4 2"/>
							</Style>
							<Style TargetType="Separator">
								<Setter Property="Margin" Value="0 8 0 4"/>
							</Style>
						</ItemsControl.Resources>
					</ItemsControl>
				</Expander>
				<Expander Header="{Localizing Extension}" IsExpanded="{ViewModel IsExtensionExpanded, DefaultValue=False}">
					<ItemsControl ItemsSource="{StaticResource CommonToolBarCollection2}">
						<ItemsControl.Resources>
							<Style TargetType="CheckBox">
								<Setter Property="VerticalAlignment" Value="Center"/>
								<Setter Property="Margin" Value="4 2 4 2"/>
							</Style>
							<Style TargetType="Separator">
								<Setter Property="Margin" Value="0 8 0 4"/>
							</Style>
						</ItemsControl.Resources>
					</ItemsControl>
				</Expander>
			</StackPanel>
			<ItemsControl Margin="4" ItemsSource="{StaticResource SettingsCommands}"/>
		</StackPanel>
	</ScrollViewer>
</View>
